<template>
	<view class="content">
		<view class="cont-box">
			<view class="title">{{info.title||''}}</view>
			<u-parse :content="info.context"></u-parse>
		</view>


	</view>
</template>

<script>
	import {
		newsDetail

	} from '@/api/common'

	export default {
		components: {


		},
		data() {
			return {
				info:{
					context: '',
				},
			};
		},

		onLoad(option) {
			if (option.id) {
				this.getDetails(option.id)
			}
		},
		onShow() {
			// await this.reset()
		},

		methods: {
			getDetails(id) {
				newsDetail(id).then(res => {
					if (res.code == 200) {
						this.info = res.data
					} else {
						uni.$u.toast(res.msg)
					}
				})
			},
		}
	};
</script>

<style scoped lang="scss">
	.content {
		height: 100vh;
		overflow-y: auto;
		box-sizing: border-box;
		background: #F6F1E5;
		padding: 30rpx;

	}

	.cont-box {
		padding: 30rpx;
		background: #FFFFFF;
		border-radius: 20rpx;
		.title {
			font-size: 32rpx;
			text-align: center;
			font-weight: bold;
		}
	}
</style>